set report_file_name="report"
set report_tmpdir="tmp"
set report_output_dir="pdf"

pdflatex -aux-directory=%report_tmpdir% -output-directory=%report_output_dir% -enable-installer -interaction=nonstopmode %report_file_name%.tex

CD %report_tmpdir%
makeglossaries report
CD ..

:: makeindex -s %report_tmpdir%\%report_file_name%.ist -t %report_tmpdir%\%report_file_name%.glg -o %report_tmpdir%\%report_file_name%.gls %report_tmpdir%\%report_file_name%.glo

pdflatex -aux-directory=%report_tmpdir% -output-directory=%report_output_dir% -interaction=nonstopmode %report_file_name%.tex
pdflatex -aux-directory=%report_tmpdir% -output-directory=%report_output_dir%  -interaction=nonstopmode %report_file_name%.tex

pause